<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<title></title>
	</head>
	<script type="text/javascript" src="../js/angular.min.js"></script>

	<body>
		<div ng-app="myapp" ng-controller="myctl">
			<input type="text" ng-model="abc" />
			<div ng-bind='abc'></div>
			
			<button ng-click='clean()'>清空</button>
		</div>
		
		<script>
			// 定义该模块下的控制器 
			// 依赖注入 ，$scope作用域对象，操作当前作用域下的视图，例如：为name的视图赋值。 
			var myapp = angular.module('myapp',[]);
			
			myapp.controller('myctl',function($scope){
				$scope.abc = 'ooiIioo';
				
				$scope.clean = function(){
					$scope.abc = '';
				}
			})
		</script>
	</body>

</html>